/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package vectors;

/**
 *
 * @author Кирилл
 */
public class ObserverForVectors implements Observer{
    private ArrayVector vector;
    private String status;
    
   // private String VectorIn ;
    public ObserverForVectors(ArrayVector vector){
        this.status = vector.getClass().getSimpleName();
        this.vector = vector;
        vector.registerObserver(this);
}
    

    @Override
    public void updateElement(int index) {
     System.out.print ("update element with index "+index+"\n");
    }
    @Override
    public void update() {
    System.out.println("object has been modified " + status+"\n" );
    }
    
}
